/*
 * @Description: 
 * @Author: xunzhaotech
 * @Email: luyb@xunzhaotech.com
 * @QQ: 1525572900
 * @Date: 2024-01-14 14:59:33
 * @LastEditTime: 2024-03-31 19:29:10
 * @LastEditors: xunzhaotech
 */
// import baseConfig from 'awesome-vitepress-theme/config'
// import { defineConfigWithTheme } from 'vitepress'
// import type { ThemeConfig } from 'awesome-vitepress-theme'
import { defineConfigWithTheme } from 'vitepress'
// import vue from '@vitejs/plugin-vue'
import type { ThemeConfig } from './types/custom-theme'
import { genFeed } from './genFeed.js'
export default defineConfigWithTheme<ThemeConfig>({
  lang: 'en-US',
  base: '/micro-design-ui/',
  title: 'MicroDesign UI',
  titleTemplate: ':title - MicroDesign UI',
  description: '一个专注于微服务架构生态的UI框架',
  cleanUrls: false,
  // rewrites: {
  //   'source/:page': 'destination/:page'
  // },
  head: [
    ['meta', {charset:'UTF-8' }],
    ['meta', { name: 'viewport', content: 'width=device-width, initial-scale=1.0' }],
    ['meta', { name: 'description', content: '一个专注于微服务架构生态的UI框架' }],
    ['meta', { name: 'keywords', content: 'MicroDesign UI, 微服务框架，MicroDesign Admin' }],
    ['meta', { name: 'author', content: 'MicroDesign UI' }],
    [
     'link',
      { rel: 'stylesheet', href: '/docs/tailwind.css' }
    ],
    [
      'link',
      { rel: 'preconnect', href: 'https://fonts.googleapis.com' }
    ],
    [
      'link',
      { rel: 'preconnect', href: 'https://fonts.gstatic.com', crossorigin: '' }
    ],
    [
      'link',
      { href: 'https://fonts.googleapis.com/css2?family=Roboto&display=swap', rel: 'stylesheet' }
    ],
    [
      'link',
      {
        rel: 'icon',
        size: '32x32',
        type: 'image/x-icon',
        href: '/favicon.ico'
      }
    ],
    [
      'script',
      {
        src: 'https://cdn.usefathom.com/script.js',
        'data-site': 'NYHGSGQV',
        'data-spa': 'auto',
        defer: ''
      }
    ]
  ],
  srcDir: '.',
  outDir: ' ./.vitepress/dist',
  srcExclude: ['**/README.md', '**/TODO.md'],
  assetsDir: 'static',
  cacheDir: '.vitepress/.vite',
  ignoreDeadLinks: true,
  metaChunk: true,
  mpa: false,
  appearance: true,
  lastUpdated: true,
  markdown: {},
  themeConfig: {
    logo: '/logo.png', // 网站 logo
    siteTitle: 'MicroDesign UI',
    // navbar: [
    //   // 自定义导航栏
    // ],
    // sidebar: [
    //   // 自定义侧边栏
    // ],
    // colorScheme: 'dark', // 启用暗色主题
    // ...其他主题配置项
    socialLinks: [
      { icon: 'github', link: 'https://gitee.com/MicroDesign/micro-design-ui' },
      { icon: 'npm', link: 'https://www.npmjs.com/package/@microdesign/vuepress-theme-microdocs' }
    ],
    editLink: {
      pattern: 'https://gitee.com/MicroDesign/micro-design-ui/:path',
      text: '在线编辑'
    },
    docFooter: {
      prev: 'Pagina prior',
      next: 'Proxima pagina'
    },
    lastUpdated: {
      text: '更新时间',
      formatOptions: {
        dateStyle: 'full',
        timeStyle: 'medium'
      }
    },
    footer: {
      message: 'Released under the MIT License.',
      copyright: 'Copyright © 2019-present MicroDesign UI'
    }
  },
  vite: {},
  vue: {
  },
  // locale: 'en-US', // 设置默认语言
  locales: {
    'en-US': {
      // selectText: 'Languages',
      // ariaLabel: 'Languages',
      label: 'English (US)',
      // editLinkText: 'Edit this page on GitHub',
      // lastUpdated: 'Last Updated',
      // ...其他语言选项
    },
    'zh-CN': {
      // selectText: '选择语言',
      // ariaLabel: '选择语言',
      label: '简体中文',
      // editLinkText: '在 GitHub 上编辑此页',
      // lastUpdated: '上次更新',
      // ...其他语言选项
    }
  },
  buildEnd: genFeed
})
